package com.wms.controller;

import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.dto.AddStkByLocationDTO;
import com.wms.service.AddStkByLocationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "skh-添加盘点任务(按货架)")
public class AddStkByLocationController {
    @Autowired
    AddStkByLocationService addStkByLocationService;

    @PostMapping("/AddStkByLocation")
    @ApiOperation("添加盘点任务(按货架)")
    public ResultBean AddStkByLocation(@RequestBody AddStkByLocationDTO addStkByLocationDTO) {
        int rs = addStkByLocationService.AddStkByLocation(addStkByLocationDTO);
        if (rs==1){
            return R.success("添加成功");
        }
        return R.fail("添加失败");
    }
}
